package com.Ajava1704.for线程池2;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 作者: LCG
 * 日期: 2020/2/11 09:35
 * 描述: 创建一个定长的线程池  创建一个带缓冲的线程池
 */
public class ForPoolTest3 {

    public static void main(String[] args) {

        //创建一个定长的线程池
        ExecutorService executorService = Executors.newFixedThreadPool(2);

        //创建一个带缓冲的线程池
        ExecutorService executorService1 = Executors.newCachedThreadPool();
    }

}
